<%--
  Created by IntelliJ IDEA.
  User: 邂逅
  Date: 2024/11/28
  Time: 下午8:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>登录页面</title>
</head>
<body background="static/img/systemImages/dd8a13903a6aa35165811794be5c98ba.jpg">
<div align="center">
    <h1>欢迎登录</h1>
    <form action="product_list.jsp" method="post" id="form">
        <p>用户名:&nbsp<input id="username" name="username" type="text">&nbsp&nbsp</p>
        <p>密码:&nbsp<input id="password" name="password" type="password"></p>
        <input type="submit" class="button" value="登录" onclick="">
        <button><a href="xin.jsp" rel="external nofollow" >注册</a></button>
    </form>
    <div id="errorMsg" value="null"><%=session.getAttribute("login_msg")%></div>
</div>

<script>
    if(document.getElementById("errorMsg").innerText==="null"||document.getElementById("errorMsg").innerText===""){
        document.getElementById("errorMsg").setAttribute('style',"display:none")

    } else {
        document.getElementById("errorMsg").setAttribute('style',"display:block")
    }
</script>
</body>
</html>